import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios' //引入axios

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import headCom from "@/components/header/headCom.vue";
import searchCom from "@/components/searchCom/searchCom.vue";
import footerCom from "@/components/footerCom/footerCom.vue";
import shopListCom from "@/components/shopListCom/shopListCom.vue";
import cartCom from "@/components/cartCom/cartCom.vue";
import crumbsHistoryCom from "@/components/crumbsHistoryCom/crumbsHistoryCom.vue";
import buyCartCom from "@/components/buyCart/buyCartCom.vue";

Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.prototype.$axios = axios//全局使用axios
Vue.component(headCom.name,headCom);
Vue.component(searchCom.name,searchCom);
Vue.component(footerCom.name,footerCom);
Vue.component(shopListCom.name,shopListCom);
Vue.component(cartCom.name,cartCom);
Vue.component(crumbsHistoryCom.name,crumbsHistoryCom);
Vue.component(buyCartCom.name,buyCartCom);

new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate(){
    Vue.prototype.$bus=this//安装全局事件总线
  }
}).$mount('#app')
